/******************************************************************************
 * Filename: Instrument.cpp
 *
 * Copyright 2012, Research In Motion Ltd
 *
 * Author: Gang Li
 *
 * Created: Jul 7, 2012
 *
 * Description:
 *
 *****************************************************************************/

#include "Instrument.h"
#include <stdio.h>
#include <stdlib.h>

Instrument::Instrument() : category(0)
{
    printf("Instrument()\n");
}

Instrument::~Instrument()
{
    category = -1;
    printf("~Instrument()\n");
}

void Instrument::play() const
{
    printf("Instrument::play(%d)\n", category);
}

void * Instrument::operator new(size_t sz)
{
    printf("Instrument::operator new(%d) is called\n", sz);
    return malloc(sz);
}

void Instrument::operator delete(void * p)
{
    printf("Instrument::operator delete is called\n");
    free(p);
}

void Instrument::plug()
{
    printf("Instrument::plug()\n");
}
